package com.plm.k8s.myk8sapi.cmd;

import com.plm.k8s.myk8sapi.pojo.entity.hpa.HpaEntity;

import java.util.List;
import java.util.Map;

/**
 * @author 潘磊明
 * 版本号：1.0
 * 创建日期：2021/8/3 18:06
 */
public interface IHpaCmd {

    /**
     * 创建hpa
     * @param name
     * @param resourceKind
     * @param resourceName
     * @param min
     * @param max
     * @param cpuPercent
     * @return
     */
    boolean createHpa(String name, String resourceKind, String resourceName,
            Integer min, Integer max, Integer cpuPercent, String namespace) throws Exception;

    /**
     * 获取害怕列表信息
     * @param isAll
     * @param namespace
     * @param nameFilter
     * @param labelFilter
     * @return
     * @throws Exception
     */
    List<HpaEntity> listHpa(boolean isAll, String namespace, String nameFilter,
            Map<String, String> labelFilter) throws Exception;

    /**
     * 删除hpa
     * @param name
     * @param namespace
     * @return
     */
    boolean deleteHpa(String name, String namespace) throws Exception;
}
